﻿using Microsoft.Practices.Unity;
using Sasa.QualityTools.CodeAnalysis.FxCopIntegrator.Commands.Behaviors.Building;
using Sasa.QualityTools.CodeAnalysis.FxCopIntegrator.Commands.Behaviors.CodeAnalysis;
using Sasa.QualityTools.CodeAnalysis.FxCopIntegrator.Commands.Behaviors.CodeAnalysis.Inspection;

namespace Sasa.QualityTools.CodeAnalysis.FxCopIntegrator.Commands
{
    [MenuCommand(Constants.Item.Id, Constants.Item.Inspect)]
    public class InspectItemsCommand : CommandBase<CodeAnalysisCommandExecutionContext>
    {
        public InspectItemsCommand(IUnityContainer container)
            : base(container)
        {
            Behaviors.Add(new ValidateFxCopCmdAvailabilityBehavior(container));
            Behaviors.Add(new BuildItemContainingProjectBehavior(container));
            Behaviors.Add(new CreateItemInspectorBehavior(container));
            Behaviors.Add(new PerformCodeAnalysisBehavior(container));
            Behaviors.Add(new ShowCodeInspectionResultBehavior(container));
        }
    }
}
